//引入mockjs插件开始模拟数据
import Mock from 'mockjs'
import categoryAPI from './header/category.JSON'
import homeInfoAPI from './home/homeInfo.JSON'
import goodsShowAPI from './goodsShow/goodsShow.js'
import shopCartAPI from '@/mock/shopCart/shopCart.js'
import loginAPI from '@/mock/login/login.js'
import detailAPI from '@/mock/detail/detailInfo.js'
import addressAPI from '@/mock/paying/address.js'

//获取商品分类接口
Mock.mock(/mock\/category/,'get',categoryAPI)
//获取首页IMG信息
Mock.mock(/mock\/homeInfo/,'get',homeInfoAPI)
//获取商品展示接口
Mock.mock(/mock\/goodsShow/,'get',goodsShowAPI.getGoods)
//获取详细页商品
Mock.mock(/mock\/detail/,'get',detailAPI.getDetailList)
//添加购物车接口
Mock.mock(/mock\/shopCart/, 'post', shopCartAPI.createCartList)
//获取购物车接口
Mock.mock(/mock\/shopCart/, 'get', shopCartAPI.getCartList)
//更新购物车勾选状态
Mock.mock(/mock\/updataCheck/, 'post', shopCartAPI.updataChecked)
//更新购物车所有勾选状态
Mock.mock(/mock\/updataAllChecked/, 'post', shopCartAPI.updataAllChecked)
//删除购物车商品
Mock.mock(/mock\/delShopCart/, 'post', shopCartAPI.delCartList)
//获取用户地址
Mock.mock(/mock\/address/,'get',addressAPI.getAddress)
//登录
Mock.mock(/mock\/login/, 'post', loginAPI.getLogin)
